
import axiosInstance from "../axiosInstance"

const addressInfo = {
    /**
     * 客户获取自己的收货地址列表
     * @param pageIndex
     */
    getMyAddressInfoList(pageIndex) {
        return axiosInstance.get(`/addressInfo/getMyAddressInfoList?pageIndex=${pageIndex}`);
    },

    /**
     * 客户新增自己的收货地址
     */
    addMyAddressInfo({ address_name, address_tel, area, city, province, address_detail, address_tag }) {
        return axiosInstance.post(`/addressInfo/addMyAddressInfo`, {
            address_name,
            address_tel,
            area,
            city,
            province,
            address_detail,
            address_tag
        });
    },
    deleteById(id) {
        return axiosInstance.delete(`/addressInfo/deleteById/${id}`);
    },
}

export default addressInfo;